package com.softwarerusher.model;

/**
 * TOutstoredetailId entity.
 * 
 * @author MyEclipse Persistence Tools
 */

public class TOutstoredetailId implements java.io.Serializable {

	// Fields

	private TBook TBook;
	private Integer outstoreNum;
	private TOutstore TOutstore;

	// Constructors

	/** default constructor */
	public TOutstoredetailId() {
	}

	/** full constructor */
	public TOutstoredetailId(TBook TBook, Integer outstoreNum,
			TOutstore TOutstore) {
		this.TBook = TBook;
		this.outstoreNum = outstoreNum;
		this.TOutstore = TOutstore;
	}

	// Property accessors

	public TBook getTBook() {
		return this.TBook;
	}

	public void setTBook(TBook TBook) {
		this.TBook = TBook;
	}

	public Integer getOutstoreNum() {
		return this.outstoreNum;
	}

	public void setOutstoreNum(Integer outstoreNum) {
		this.outstoreNum = outstoreNum;
	}

	public TOutstore getTOutstore() {
		return this.TOutstore;
	}

	public void setTOutstore(TOutstore TOutstore) {
		this.TOutstore = TOutstore;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof TOutstoredetailId))
			return false;
		TOutstoredetailId castOther = (TOutstoredetailId) other;

		return ((this.getTBook() == castOther.getTBook()) || (this.getTBook() != null
				&& castOther.getTBook() != null && this.getTBook().equals(
				castOther.getTBook())))
				&& ((this.getOutstoreNum() == castOther.getOutstoreNum()) || (this
						.getOutstoreNum() != null
						&& castOther.getOutstoreNum() != null && this
						.getOutstoreNum().equals(castOther.getOutstoreNum())))
				&& ((this.getTOutstore() == castOther.getTOutstore()) || (this
						.getTOutstore() != null
						&& castOther.getTOutstore() != null && this
						.getTOutstore().equals(castOther.getTOutstore())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getTBook() == null ? 0 : this.getTBook().hashCode());
		result = 37
				* result
				+ (getOutstoreNum() == null ? 0 : this.getOutstoreNum()
						.hashCode());
		result = 37 * result
				+ (getTOutstore() == null ? 0 : this.getTOutstore().hashCode());
		return result;
	}

}